import React from 'react';
import {Text, View, StyleSheet, Button, Alert} from 'react-native';
import { StackNavigator, navigation } from 'react-navigation';



const HomeScreen = ()=> {
  <View style={{flex: 1,justifyContent:'center'}}>
    <Text>接警单</Text>
    <Button onPress={()=> navigation.navigate('Details')}>去主页</Button>
  </View>
}

const DetailsScreen  = () => {
  <View style={{flex: 1,justifyContent:'center'}}>
    <Text>Details</Text>
  </View>
}
const RootNavigator = StackNavigator({
  Home:{
    screen:HomeScreen,
    navigationOptions: {
      headerTitle: 'Home',
    },
  },
  Details:{
    screen:DetailsScreen ,
    navigationOptions: {
      headerTitle: 'Details',
    },
  },
});
export default RootNavigator;